package com.angysnail.entity;

import java.util.HashSet;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.google.common.collect.Lists;
import com.google.common.collect.Sets;

public class Person {
	public String name;
	public int age;
	public boolean male;
	public long score;

	public Person(String name, int age, boolean male, long score) {
		this.name = name;
		this.age = age;
		this.male = male;
		this.score = score;
	}

	public static List<Person> getSampleList() {
		Person p1 = new Person("马布里", 39, true, 39800L);
		Person p2 = new Person("勒布朗", 34, true, 139800L);
		Person p31 = new Person("科比1", 23, true, 159800L);
		Person p32 = new Person("科比2", 23, true, 159801L);
		Person p41 = new Person("隆多1", 31, true, 109800L);
		Person p42 = new Person("隆多2", 31, true, 109801L);
		return Lists.newArrayList(p1, p2, p32, p31, p41, p42);
	}

	public static HashSet<Person> getSampleSet() {
		List<Person> list = getSampleList();
		return Sets.newHashSet(list);
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this).append("name", name).append("age", age).append("male", male)
				.append("score", score).toString();
	}

}
